package com.chuantou.yuba.api.to;

import android.os.Parcel;

import com.google.gson.annotations.SerializedName;

/**
 * 登录结果TO
 * 
 * @author Administrator
 * 
 */
public class LoginTO extends BaseTO {
	@SerializedName("data")
	private UserTO user;

	public LoginTO() {
		super();
	}

	public LoginTO(Parcel source) {
		super(source);
		this.user = source.readParcelable(UserTO.class.getClassLoader());
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		super.writeToParcel(dest, flags);
		dest.writeParcelable(user, flags);
	}

	public static final Creator<LoginTO> CREATOR = new Creator<LoginTO>() {

		@Override
		public LoginTO[] newArray(int size) {
			return new LoginTO[size];
		}

		@Override
		public LoginTO createFromParcel(Parcel source) {
			return new LoginTO(source);
		}
	};

	public UserTO getUser() {
		return user;
	}

	public void setUser(UserTO user) {
		this.user = user;
	}

}
